<template>
  <z-modal
    v-bind="modalOption"
    @ok="handleOk"
    @cancel="handleCancel"
    cancelText="关闭"
  >
    <a-spin :spinning="confirmLoading">
      <a-form-model layout="horizontal" labelAlign="right" ref="ruleForm" :label-col="labelCol" :wrapper-col="wrapperCol" :model="form" :rules="validatorRules">
        <a-row>
          <a-col :span="12" >
            <a-form-model-item label="邮箱" prop = "email" >
              <a-input   v-model.trim="form.email" disabled/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12" >
            <a-form-model-item label="测评活动名称" prop = "activityName" >
              <a-input   v-model.trim="form.activityName" disabled/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12" >
            <a-form-model-item label="姓名"  >
              <a-input v-model.trim="form.testee.name" disabled/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12" >
            <a-form-model-item label="性别" >
              <z-dict-select-tag v-model="form.testee.gender" :disabled=true dictCode="SEX"/>
            </a-form-model-item>
          </a-col>

          <a-col :span="12" >
            <a-form-model-item label="出生日期"  >
              <a-input   v-model.trim="form.testee.birthday" disabled/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12" >
            <a-form-model-item label="毕业时间"  >
              <a-input   v-model.trim="form.testee.graduationDate" disabled/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12" >
            <a-form-model-item label="毕业院校"  >
              <a-input   v-model.trim="form.testee.graduationSchool" disabled/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12" >
            <a-form-model-item label="专业"  >
              <a-input   v-model.trim="form.testee.major" disabled/>
            </a-form-model-item>
          </a-col>

          <a-col :span="12" >
            <a-form-model-item label="手机号" prop = "testee.mobile" >
              <a-input   v-model.trim="form.testee.mobile" disabled/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12" >
            <a-form-model-item label="邀请状态" prop="inviteResult">
              <z-dict-select-tag v-model="form.inviteResult" :disabled=true dictCode="BEISEN_INVITE_RESULT"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12" >
            <a-form-model-item label="生效时间" prop = "endTime" >
              <a-input   v-model.trim="form.startTime" disabled/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12" >
            <a-form-model-item label="失效时间" prop = "endTime" >
              <a-input   v-model.trim="form.endTime" disabled/>
            </a-form-model-item>
          </a-col>

          <a-col :span="12" >
            <a-form-model-item label="作答状态" prop="state">
              <z-dict-select-tag v-model="form.state" :disabled=true dictCode="BEISEN_ACCESSMENT_STATE"/>
            </a-form-model-item>
          </a-col>

          <a-col :span="12" >
            <a-form-model-item label="作答状态" prop="sn">
              <a-input   v-model.trim="form.sn" disabled/>
            </a-form-model-item>
          </a-col>
        </a-row>
      </a-form-model>
    </a-spin>
  </z-modal>
</template>

<script>
import ModalFormMixin from '@/mixins/ModalFormMixin'
import ZDictSelectTag from '@/components/dict/ZDictSelectTag'
export default {
  name: 'InviteModal',
  components: { ZDictSelectTag },
  mixins: [ModalFormMixin],
  data() {
    return {
      validatorRules: {
      },
      url: {
      },
      form: {
        testee: {},
        result:{}
      },
      resultLabelCol: {
        xs: { span: 24 },
        sm: { span: 3 }
      },
      resultWrapperCol: {
        xs: { span: 24 },
        sm: { span: 19 }
      },
    }
  },
  methods: {
    close() {
      this.$emit('close')
      this.model = {}
      this.form = {
        testee: {},
        result:{}
      }
      this.$refs.ruleForm && this.$refs.ruleForm.resetFields()
      this.visible = false
      // this.disableSubmit = false
    }
  }
}
</script>

